Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qrcode-generator

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qrcode-generator

QR Code Generator implementation in JavaScript.

  • 1.4.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
273K
decreased by-22.76%
Maintainers
1
Weekly downloads
 
Created

What is qrcode-generator?

The qrcode-generator npm package is a versatile tool for generating QR codes in various formats and configurations. It supports different error correction levels, QR code versions, and allows customization of the output format (e.g., HTML, SVG, and canvas).

What are qrcode-generator's main functionalities?

Generate QR Code in HTML

This feature allows you to generate a QR code and output it as an HTML image tag. The code sample demonstrates creating a QR code with low error correction level and version 4, adding data to it, and generating an HTML image tag.

const QRCode = require('qrcode-generator');
const qr = QRCode(4, 'L');
qr.addData('Hello, world!');
qr.make();
console.log(qr.createImgTag());

Generate QR Code in SVG

This feature allows you to generate a QR code and output it as an SVG tag. The code sample demonstrates creating a QR code with low error correction level and version 4, adding data to it, and generating an SVG tag.

const QRCode = require('qrcode-generator');
const qr = QRCode(4, 'L');
qr.addData('Hello, world!');
qr.make();
console.log(qr.createSvgTag());

Generate QR Code in Canvas

This feature allows you to generate a QR code and render it on an HTML canvas element. The code sample demonstrates creating a QR code with low error correction level and version 4, adding data to it, and rendering it on a canvas.

const QRCode = require('qrcode-generator');
const qr = QRCode(4, 'L');
qr.addData('Hello, world!');
qr.make();
const canvas = document.createElement('canvas');
const context = canvas.getContext('2d');
qr.renderTo2dContext(context);

Other packages similar to qrcode-generator

Keywords

FAQs

Package last updated on 18 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc